﻿package mortal.component.skin.numericStepper
{
    import com.greensock.layout.*;
    import com.mui.core.*;
    import com.mui.skins.*;
    import fl.core.*;
    import flash.display.*;
    import flash.geom.*;
    import flash.text.*;
    import mortal.common.*;
    import mortal.component.gconst.*;

    public class NumericStepperStyle extends SkinStyle
    {
        private var _textFormat:TextFormat;

        public function NumericStepperStyle()
        {
            this._textFormat = new GTextFormat(null, 12, 1036268, null, null, null, null, null, TextFormatAlign.RIGHT);
            this._textFormat.align = AlignMode.RIGHT;
            return;
        }// end function

        override public function setStyle(param1:UIComponent) : void
        {
            param1.setStyle("upSkin", ResourceConst.getScaleBitmap("InputDisablBg"));
            param1.setStyle("upArrowUpSkin", GlobalClass.getBitmap("numUp_upSkin"));
            param1.setStyle("upArrowOverSkin", GlobalClass.getBitmap("numUp_overSkin"));
            param1.setStyle("upArrowDownSkin", GlobalClass.getBitmap("numUp_upSkin"));
            param1.setStyle("downArrowUpSkin", GlobalClass.getBitmap("numDown_upSkin"));
            param1.setStyle("downArrowOverSkin", GlobalClass.getBitmap("numDown_overSkin"));
            param1.setStyle("downArrowDownSkin", GlobalClass.getBitmap("numDown_upSkin"));
            param1.setStyle("focusRectSkin", Sprite);
            param1.setStyle("TextInput_disabledSkin", GlobalClass.getScaleBitmap("PanelBg", new Rectangle(22, 11, 1, 1)));
            param1.setStyle("textFormat", this._textFormat);
            param1.setStyle("maxBtnDownSkin", GlobalClass.getBitmap("numMax_upSkin"));
            param1.setStyle("maxBtnUpSkin", GlobalClass.getBitmap("numMax_upSkin"));
            param1.setStyle("maxBtnOverSkin", GlobalClass.getBitmap("numMax_overSkin"));
            param1.setStyle("minBtnDownSkin", GlobalClass.getBitmap("numMin_upSkin"));
            param1.setStyle("minBtnUpSkin", GlobalClass.getBitmap("numMin_upSkin"));
            param1.setStyle("minBtnOverSkin", GlobalClass.getBitmap("numMin_overSkin"));
            return;
        }// end function

    }
}
